package com.qf.springmvc02.controller;

import com.qf.springmvc02.entity.FastUser;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * @authorDXT
 * @date2022/5/4 19:20
 */
@RestController
@RequestMapping("/fast")
public class FastController {
    @RequestMapping("test1")
    public FastUser test1(){
        FastUser fastUser = new FastUser();
        fastUser.setUsername("jack");
        fastUser.setBirthday(new Date());
        fastUser.setMarryDay(new Date());
        fastUser.setSalary(333.333D);
        fastUser.setPassword("123");
//        // 主动抛一个异常 为了验证全局的异常解析器
//        int a = 1/0;
        return fastUser;
    }
}
